package com.qf.generator.service.impl;

import com.qf.generator.Pojo.TbUser;
import com.qf.generator.Pojo.UserVO;
import com.qf.generator.mapper.TbUserMapper;
import com.qf.generator.service.TbUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

/**
* @author LC
* @description 针对表【tb_user】的数据库操作Service实现
* @createDate 2025-09-25 09:48:23
*/
@Service
public class TbUserServiceImpl implements TbUserService {
    @Autowired
    private TbUserMapper tbUserMapper;

    @Override
    public TbUser getUserById(Integer id) {
        return tbUserMapper.getUserById(id);
    }

    @Override
    public ArrayList<TbUser> getUserList() {
        return tbUserMapper.getUserList();
    }

    @Override
    public TbUser login(String username, String password) {
        return tbUserMapper.login(username,password);
    }

    @Override
    public ArrayList<TbUser> getUserByMap(HashMap<String, String> map) {
        return tbUserMapper.getUserByMap(map);
    }

    @Override
    public TbUser loginv2(TbUser user) {
        return tbUserMapper.loginv2(user);
    }

    @Override
    public int addUser(TbUser user) {
        return tbUserMapper.addUser(user);
    }

    @Override
    public int updateUser(TbUser user) {
        return tbUserMapper.updateUser(user);
    }

    @Override
    public int deleteUser(int id) {
        return tbUserMapper.deleteUser(id);
    }

    @Override
    public Object GetUserByMapv2(Map<String, Object> map) {
        return tbUserMapper.GetUserByMapv2(map);
    }

    @Override
    public int updateUserv2(TbUser user) {
        return tbUserMapper.updateUserv2(user);
    }

    @Override
    public int deleteUserList(ArrayList<Integer> list) {
        return tbUserMapper.deleteUserList(list);
    }

    @Override
    public UserVO GetOrderListByID(Integer id) {
        return tbUserMapper.GetOrderListByID(id);
    }
}
